<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MyISERN 1.3 - Add</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
    <div id="logo">
        <h1><a href="home.jsp">MyISERN 1.3</a></h1>
    </div>
    <div id="menu">
        <ul>
            <li><a href="home.jsp">Homepage</a></li>
            <li><a href="display.jsp">Display</a></li>
            <li class="current_page_item"><a href="add.jsp">Add</a></li>
            <li><a href="edit.jsp">Edit</a></li>
			<li><a href="sanityCheck.jsp">Report</a></li>
            <li><stripes:link href="Logout.action" event="logout" >Logout</stripes:link></li>            
        </ul>
    </div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
    <!-- start leftbar -->
    <div id="leftbar" class="sidebar">
        <ul>
            <li>
                <h2>Add</h2>
                <ul>
                    <li>
                        <stripes:form id="AddResearcherForm" action="/Researcher.action">
                          <stripes:submit value="Researcher" name="researcherForm"/>
                        </stripes:form>
                    </li>
                    <li>
                        <stripes:form id="AddOrganizationForm" action="/Organization.action">
                          <stripes:submit value="Organization" name="organizationForm"/>
                        </stripes:form>
                    </li>
                    <li>
                        <stripes:form id="AddCollaborationForm" action="/Collaboration.action">
                          <stripes:submit value="Collaboration" name="collaborationForm"/>
                        </stripes:form>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- end leftbar -->
    <!-- start content -->
    <div id="content">
        <div class="post">
            <h1 class="title" align="center">Add ${actionBean.addType}</h1>
            <div class="entry">
                <table>
					<tbody>
						<tr>
							<c:if test='${actionBean.added == true}'>
								<td colspan="2" align="center"><h3>The following ${actionBean.addType} has been added:</h3></td>
							</c:if>
						</tr>
						<tr>
							<td colspan="2" align="center"><strong><font color="white">${actionBean.errorMessage}</font></strong></td>
						</tr>
							<c:if test='${actionBean.addType == "Researcher"}'>
								<stripes:form id="ResearcherForm" action="/Researcher.action" focus="">
									<tr>
										<td><strong>Name&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="name" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Organization&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="organization" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Email&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="email" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Picture-Link&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="pictureLink" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Bio-Statement&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="bioStatement" cols="27"/></td>
									</tr>
									<tr>
										<td colspan="2" align="center">&nbsp;</td>
									</tr>
									<tr>
										<td></td>
										<c:choose>
											<c:when test='${actionBean.added == true}'>
												<td align="center">
													<stripes:submit value="Edit" name="edit"/>
													&nbsp;&nbsp;&nbsp;
													<stripes:submit value="Remove" name="remove"/>
												</td>
											</c:when>
											<c:otherwise>
												<td align="right">
													<stripes:submit value="Add" name="add"/>
												</td>
											</c:otherwise>
										</c:choose>
									</tr>
								</stripes:form>
							</c:if>
							<c:if test='${actionBean.addType == "Organization"}'>
								<stripes:form id="OrganizationForm" action="/Organization.action" focus="">
									<tr>
										<td><strong>Name&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="name" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Type&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="type" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Contact&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="contact" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Affiliated Researchers&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="affiliatedResearchers" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Country&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="country" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Research Keywords&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="researchKeywords" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Research Description&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="researchDescription" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Homepage&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="homePage" size="30"/></td>
									</tr>
									<tr>
										<c:if test='${actionBean.added != true}'>
											<td colspan="2" align="center"><font color="white"><strong>*Separate multiple items by commas.<strong></font></td>
										</c:if>
									</tr>
									<tr>
										<td></td>
										<c:choose>
											<c:when test='${actionBean.added == true}'>
												<td align="center">
													<stripes:submit id="edit" value="Edit" name="edit"/>
													&nbsp;&nbsp;&nbsp;
													<stripes:submit id="remove" value="Remove" name="remove"/>
												</td>
											</c:when>
											<c:otherwise>
												<td align="right">
													<stripes:submit value="Add" name="add"/>
												</td>
											</c:otherwise>
										</c:choose>
									</tr>
								</stripes:form>
							</c:if>
							<c:if test='${actionBean.addType == "Collaboration"}'>
								<stripes:form id="CollaborationForm" action="/Collaboration.action" focus="">
									<tr>
										<td><strong>Name&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:text name="name" size="30"/></td>
									</tr>
									<tr>
										<td><strong>Collaborating-Organizations&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="collaboratingOrganizations" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Collaboration-Types&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="collaborationTypes" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Years&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="years" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Outcome-Types&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="outcomeTypes" cols="27"/></td>
									</tr>
									<tr>
										<td><strong>Description&nbsp;&nbsp;&nbsp;</strong></td>
										<td><stripes:textarea name="description" cols="27"/></td>
									</tr>
									<tr>
										<c:if test='${actionBean.added != true}'>
											<td colspan="2" align="center"><font color="white"><strong>*Separate multiple items by commas.<strong></font></td>
										</c:if>
									</tr>
									<tr>
										<td></td>
										<c:choose>
											<c:when test='${actionBean.added == true}'>
												<td align="center">
													<stripes:submit value="Edit" name="edit"/>
													&nbsp;&nbsp;&nbsp;
													<stripes:submit value="Remove" name="remove"/>
												</td>
											</c:when>
											<c:otherwise>
												<td align="right">
													<stripes:submit value="Add" name="add"/>
												</td>
											</c:otherwise>
										</c:choose>
									</tr>
								</stripes:form>
							</c:if>
					</tbody>
				</table>
            </div>
            <p class="links"><a href="http://isern.iese.de/network/ISERN/pub/isern.mail.html" class="comments">Contact Us</a></p>
        </div>
    </div>
    <!-- end content -->
    <div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<hr />
<div id="footer">
    <p>&copy;2007 All Rights Reserved.</p>
</div>
</body>
</html>
